//
//  AppMacro.h
//  CandyDizzle
//
//  Created by Cloner Team on 8/2/14.
//
//


//
#ifndef __APPMACROS_H__
#define __APPMACROS_H__

#include "cocos2d.h"
#define DESIGN_RESOLUTION_480X320 0
#define DESIGN_RESOLUTION_800X480 1
#define DESIGN_RESOLUTION_960X640 2

/* If you want to switch design resolution, change next line */
#define TARGET_DESIGN_RESOLUTION_SIZE DESIGN_RESOLUTION_960X640

typedef struct tagResource
{
    cocos2d::Size size;
    char directory[100];
}Resource;

static Resource mdpi  =  { cocos2d::Size(480, 320), "mdpi" };
static Resource hdpi =  { cocos2d::Size(800, 480), "hdpi" };
static Resource xhdpi  =  { cocos2d::Size(960, 640), "xhdpi" };

#if (TARGET_DESIGN_RESOLUTION_SIZE == DESIGN_RESOLUTION_480X320)
static cocos2d::CCSize designResolutionSize = cocos2d::Size(480, 320);
#elif (TARGET_DESIGN_RESOLUTION_SIZE == DESIGN_RESOLUTION_800X480)
static cocos2d::CCSize designResolutionSize = cocos2d::Size(800, 480);
#elif (TARGET_DESIGN_RESOLUTION_SIZE == DESIGN_RESOLUTION_960X640)
static cocos2d::Size designResolutionSize = cocos2d::Size(640, 960);
#else
#error unknown target design resolution!
#endif

// The font size 24 is designed for small resolution, so we should change it to fit for current design resolution
#define TITLE_FONT_SIZE  (cocos2d::CCEGLView::sharedOpenGLView()->getDesignResolutionSize().width / hdpi.size.width * 24)

#endif /* __APPMACROS_H__ */